package com.umeox.watch.moto.apiclient.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Rambo 2024/5/21/0021
 * Describe:
 */
public class StoryDTO implements Parcelable {

    public long id;

    public String name;

    public String coverUrl;
    public String author;
    public String storyUrl;
    public int storyLength;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.id);
        dest.writeString(this.name);
        dest.writeString(this.coverUrl);
        dest.writeString(this.author);
        dest.writeString(this.storyUrl);
        dest.writeInt(this.storyLength);
    }

    public StoryDTO(){

    }

    protected StoryDTO(Parcel in){
        this.id = in.readLong();
        this.name = in.readString();
        this.coverUrl = in.readString();
        this.author = in.readString();
        this.storyUrl = in.readString();
        this.storyLength = in.readInt();

    }

    public static final Creator<StoryDTO> CREATOR = new Creator<StoryDTO>() {
        public StoryDTO createFromParcel(Parcel source) {
            return new StoryDTO(source);
        }

        public StoryDTO[] newArray(int size) {
            return new StoryDTO[size];
        }
    };

    @Override
    public String toString() {
        return "StoryDTO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", coverUrl='" + coverUrl + '\'' +
                ", author='" + author + '\'' +
                ", storyUrl='" + storyUrl + '\'' +
                ", storyLength=" + storyLength +
                '}';
    }

}
